Skip to content

Fix some panic information when multiple similar wildcards conflict#310

Open
jummyliu wants to merge 1 commit into
julienschmidt:masterfrom
jummyliu:master
Open

Fix some panic information when multiple similar wildcards conflict#310
jummyliu wants to merge 1 commit into
julienschmidt:masterfrom
jummyliu:master

Conversation

@jummyliu
Copy link
Copy Markdown

@jummyliu jummyliu commented May 8, 2020

  tree := &node{}
  tree.addRoute("/whose/:users/:name", fakeHandler("/whose/:users/:name"))
  tree.addRoute("/whose/:users/:user", fakeHandler("/whose/:users/:user")) // Wildcard Conflict panic

The second one will throw panic, but the information is not what I want (Maybe I don't completely understand it, this route /whose/:name is not defined). It likes below:

':user' in new path '/whose/:users/:user' conflicts with existing wildcard ':name' in existing prefix '/whose/:name'

I think below information are better.

':user' in new path '/whose/:users/:user' conflicts with existing wildcard ':name' in existing prefix '/whose/:users/:name'

So I change it. :)

@julienschmidt julienschmidt added this to the v1.4 milestone Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants